﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="JobDetails.aspx.cs" Inherits="JobSeeker_JobDetails" %>

<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="Server">
    <%: Styles.Render("~/JobDetailsStyles") %>


    <asp:Panel ID="pnlJob" runat="server" Style="display: none;">
        <table style="font-family: Arial; font-size: 10pt; width: 800px;">
            <tr>
                <td style="text-align: center;">
                    <b>Job posed on <a href="http://www.npljobs.com" target="_blank" style="text-decoration: underline; color: blue; font-style: italic;">www.npljobs.com </a></b>
                </td>
            </tr>
            <tr>
                <td><b>Company Details</b></td>
            </tr>
            <tr>
                <td style="padding-bottom: 20px; padding-left: 15px;">
                    <asp:Label ID="lblPdfCompanyName" runat="server"></asp:Label><br />
                    <asp:Label ID="lblPdfCompanyInformation" runat="server"></asp:Label><br />
                    <asp:Label ID="lblPdfURL" runat="server"></asp:Label>

                </td>
            </tr>
            <tr  runat="server" id="trCategoryTitle">

                <td><b>Category </b></td>
            </tr>
            <tr  runat="server" id="trCategoryText">
                <td style="padding-bottom: 10px; padding-left: 15px;">
                    <asp:Label ID="lblPdfJobCategory" runat="server"></asp:Label></td>
            </tr>
            <tr  runat="server" id="trVacancyTitle">
                <td><b>Title/No. of Vacancy </b></td>
            </tr>
            <tr  runat="server" id="trVacancyText">
                <td style="padding-bottom: 10px; padding-left: 15px;">
                    <asp:Label ID="lblPdfTitle" runat="server"></asp:Label></td>
            </tr>
            <%--     <tr>
                <td><b>Job Internal Code</b></td>
            </tr>
            <tr>
                <td style="padding-bottom: 10px; padding-left: 15px;">
                    <asp:Label ID="lblPdfInternalCode" runat="server"></asp:Label></td>
            </tr>--%>
            <tr  runat="server" id="trDescriptionTitle">
                <td><b>Description</b></td>
            </tr>
            <tr  runat="server" id="trDescriptionText">
                <td style="padding-bottom: 10px; padding-left: 15px;">
                    <ul>
                        <asp:Label ID="lblPdfJobDescription" runat="server"></asp:Label>
                    </ul>
                </td>
            </tr>
            <tr runat="server" id="trEducationTitle">
                <td><b>Education & Skills</b></td>
            </tr>
            <tr runat="server" id="trEducationText">
                <td style="padding-bottom: 10px; padding-left: 15px;">
                    <ul>
                        <asp:Label ID="lblPdfEducation" runat="server"></asp:Label>
                        <asp:Label ID="lblPdfSkills" runat="server"></asp:Label>
                    </ul>
                </td>
            </tr>
            <tr runat="server" id="trLanguagesRequiredTitle">
                <td><b>Languages Required</b></td>
            </tr>
            <tr runat="server" id="trLanguagesRequiredText">

                <td style="padding-bottom: 10px; padding-left: 15px;">
                    <ul>
                        <asp:Label ID="lblPdfLanguages" runat="server"></asp:Label>
                    </ul>
                </td>
            </tr>
            <tr  runat="server" id="trKnowledgeTitle">
                <td><b>Knowledge & Experience</b></td>
            </tr>
            <tr  runat="server" id="trKnowledgeText">
                <td style="padding-bottom: 10px; padding-left: 15px;">
                    <ul>
                        <asp:Label ID="lblPdfExperienceArea" runat="server"></asp:Label>
                    </ul>
                </td>
            </tr>
            <tr runat="server" id="trSpecialRequirementsTitle">
                <td><b>Specifial requirements </b></td>
            </tr>
            <tr  runat="server" id="trSpecialRequirementsText">
                <td style="padding-bottom: 10px; padding-left: 5px;">
                    <ul>
                        <asp:Label ID="lblPdfYearsGender" runat="server"></asp:Label>
                    </ul>
                </td>
            </tr>
            <tr runat="server" id="trBenefitsTitle">
                <td><b>Benefits</b></td>
            </tr>
            <tr runat="server" id="trBenefitsText">
                <td style="padding-bottom: 10px; padding-left: 15px;">
                    <ul>
                        <asp:Label ID="lblPdfBenefits" runat="server"></asp:Label>
                    </ul>
                </td>
            </tr>
            <tr runat="server" id="trJobLocationTitle">
                <td><b>JobLocation</b></td>
            </tr>
            <tr runat="server" id="trJobLocationText">
                <td style="padding-bottom: 10px; padding-left: 15px;">
                    <asp:Label ID="lblPdfJobLocation" runat="server"></asp:Label>
                </td>
            </tr>
            <tr  runat="server" id="trSalaryTitle">
                <td><b>Salary</b></td>
            </tr>
            <tr runat="server" id="trSalaryText">
                <td style="padding-bottom: 10px; padding-left: 15px;">
                    <asp:Label ID="lblPdfSalary" runat="server"></asp:Label>
                </td>
            </tr>
            <tr runat="server" id="trWorkNatureTitle">
                <td><b>Work Nature/Job Level</b></td>
            </tr>
            <tr  runat="server" id="trWorkNatureText">
                <td style="padding-bottom: 10px; padding-left: 15px;">
                    <asp:Label ID="lblPdfWorkNature" runat="server"></asp:Label><br />
                    <asp:Label ID="lblPdfJobLevel" runat="server"></asp:Label>
                </td>
            </tr>
            <tr runat="server" id="trDeadlineTitle">
                <td><b>Deadline</b></td>
            </tr>
            <tr runat="server" id="trDeadlineText">
                <td style="padding-bottom: 10px; padding-left: 15px;">
                    <asp:Label ID="lblPdfDeadline" runat="server"></asp:Label>
                </td>
            </tr>
            <tr runat="server" id="trJobSourceTitle">
                <td><b>Job Source </b></td>
            </tr>
            <tr runat="server" id="trJobSourceText">
                <td style="padding-bottom: 10px; padding-left: 15px;">
                    <asp:Label ID="lblPdfJobSource" runat="server"></asp:Label></td>
            </tr>
            <tr runat="server" id="trPostalAddressTitle">
                <td><b>Postal Address</b></td>
            </tr>
            <tr  runat="server" id="trPostalAddressText">
                <td style="padding-bottom: 10px; padding-left: 15px;">
                    <asp:Label ID="lblPostalAddress" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td>For more job please visit <b>www.npljobs.com</b></td>
            </tr>
            <tr>
                <td></td>
            </tr>
        </table>
    </asp:Panel>

    <asp:HiddenField ID="hfJobId" runat="server" />
    <asp:HiddenField ID="hfEmployeerId" runat="server" />
    <asp:HiddenField ID="hfEmployeerName" runat="server" />
    <div class="row top-margin">
        <div class="panel panel-default">
            <!-- Panel Header Here-->
            <div class="panel-heading orange-gradiant">
                <h3 class="panel-title text-center">Job details</h3>
            </div>
            <!-- Panel Header Here-->
            <div class="panel-body job-details">
                <div class="col-md-6 orange-body-bg">
                    <div class="row description">
                        <div class="col-md-4">
                            Company
                        </div>
                        <div class="col-md-8 value-label company-name">
                            :
                            <asp:Label ID="lblCompany" runat="server" Text="Company"></asp:Label>
                        </div>
                    </div>
                    <div class="row description">
                        <div class="col-md-4">
                            Job Category
                        </div>
                        <div class="col-md-8 value-label">
                            :
                        <asp:Label ID="lblCategory" runat="server" Text="Engineer/Architects"></asp:Label>
                        </div>
                    </div>
                    <div class="row">
                        <img runat="server" src="../Images/company-photo.png" alt="" id="imgNewJobImage" class="center-block" width="200" height="140" />
                    </div>
                    <div class="row">
                        <h4>Educational Requirements</h4>
                        <ul>
                            <%= EducationalRequirements()%>
                        </ul>
                        <h4>Skills Requirements
                        </h4>
                        <ul>
                            <%= Skills()%>
                        </ul>
                        <h4>Job Description/Responsibility
                        </h4>
                        <ul>
                            <%= JobDescription()%>
                        </ul>
                        <h4>Experience Requirements
                        </h4>
                        <ul>
                            <%= ExperienceRequirements()%>
                        </ul>
                        <h4>Known Language
                        </h4>
                        <ul>
                            <%= KnownLanguage()%>
                        </ul>
                        <h4>Candidate Required
                        </h4>
                        <ul>
                            <%= CandidateRequired()%>
                        </ul>
                        <h4>Other Benefits
                        </h4>
                        <ul>
                            <%= OthersBenefit()%>
                        </ul>
                        <h4>Apply Instruction
                        </h4>
                        <ul>
                            <li>
                                <%= ApplyInstruction()%></li>
                        </ul>
                        <div runat="server" id="divJobSource" class="job-source">
                            <h4>Job Source</h4>
                            <ul>
                                <li>
                                    <%= JobSource()%></li>
                            </ul>
                        </div>
                    </div>

                    <div class="row text-center apply-info">
                        <div id="divApplyButton" runat="server" class="submit-button">
                            <span class="float-shadow">
                                <asp:Button runat="server" Text="Apply Now" ID="btnApply" OnClick="btnApply_Click"
                                    CssClass="btn btn-primary orange-gradiant float-shadow" OnClientClick="return false;" />
                            </span>
                        </div>
                        <div id="CompanyInformation" runat="server" class="submit-button">
                            <h4>Company Information</h4>
                            <p class="company-description">
                                <asp:Panel ID="pnlCompanyDescription2" runat="server">
                                    <asp:Label ID="lblCompanyDescription2" runat="server" Text="A well reputed growing group of companies."></asp:Label><br />
                                </asp:Panel>
                                <asp:Panel ID="pnlCompanyWebLink2" runat="server">
                                    <asp:HyperLink ID="lnkCompanyWebLink2" runat="server" Text="www.google.com" Target="_blank"></asp:HyperLink><br />
                                </asp:Panel>
                                <asp:Panel ID="pnlCompanyPhoneNo2" runat="server">
                                    <asp:Label ID="lblCompanyPhoneNo2" runat="server" Text="019"></asp:Label><br />
                                </asp:Panel>
                                <asp:Label ID="lblCompanyCityCountry2" runat="server" Text="Dhaka, Bangladesh"></asp:Label>
                            </p>
                            <h4>Contact Person</h4>
                            <p class="company-description">
                                <asp:Panel ID="pnlContactPerson" runat="server">
                                    <asp:Label ID="lblContactPerson2" runat="server" Text="Mr. XXX"></asp:Label><br />
                                    <asp:Label ID="lblContactPersonEmail2" runat="server" Text="xxx@npl.com"></asp:Label><br />
                                    <asp:Label ID="lblContactPersonPhone2" runat="server" Text="01711052187"></asp:Label>
                                </asp:Panel>
                                <asp:Panel ID="pnlContactPersonLoginMsg" runat="server" Visible="false">
                                    <asp:Label ID="Label1" runat="server" Text="Please, Login Your Account To See Contact Information Details."></asp:Label>
                                </asp:Panel>
                            </p>
                            <div style="display: none;">
                                <div class="GroupHeaderStyle CompanyInfoLessStyle" style="font-weight: normal;">
                                    <asp:Label ID="lblCompanyDescription" runat="server" Text="A well reputed growing group of companies."></asp:Label>
                                </div>
                                <div class="GroupHeaderStyle CompanyInfoLessStyle" style="font-weight: normal; font-size: 9pt;">
                                    <asp:HyperLink ID="lnkCompanyWebLink" runat="server" Text="www.google.com" Target="_blank"></asp:HyperLink>
                                </div>
                                <div class="GroupHeaderStyle CompanyInfoLessStyle" style="font-weight: normal; font-size: 9pt;">
                                    <asp:Label ID="lblCompanyPhoneNo" runat="server" Text="019"></asp:Label>
                                </div>
                                <div class="GroupHeaderStyle CompanyInfoLessStyle" style="font-weight: normal; font-size: 9pt;">
                                    <asp:Label ID="lblCompanyCityCountry" runat="server" Text="Dhaka, Bangladesh"></asp:Label>
                                </div>
                                <div class="GroupHeaderStyle JobDetailsCompanyStyle CompanyInfoLessStyle">
                                    <u>Contact Person</u>
                                </div>
                                <div class="GroupHeaderStyle CompanyInfoLessStyle" style="font-weight: normal; font-size: 9pt;">
                                    <asp:Label ID="lblContactPerson" runat="server" Text="Mr. XXX"></asp:Label>
                                </div>
                                <div class="GroupHeaderStyle CompanyInfoLessStyle" style="font-weight: normal; font-size: 9pt;">
                                    <asp:Label ID="lblContactPersonEmail" runat="server" Text="xxx@npl.com"></asp:Label>
                                </div>
                                <div class="GroupHeaderStyle CompanyInfoLessStyle" style="font-weight: normal; font-size: 9pt;">
                                    <asp:Label ID="lblContactPersonPhone" runat="server" Text="01711052187"></asp:Label>
                                </div>
                            </div>
                        </div>
                        <h4>Application Dealline:<span>
                            <asp:Label ID="lblApplicationDeadline" runat="server" Text="May 14, 2014" ForeColor="Red"></asp:Label></span>
                        </h4>
                        <p id="EnclosePhotograph" runat="server">
                            Applicant must enclose his/her <span style="color: Red;">Photograph</span> with CV.
                        </p>

                        <div id="divCompanyAddress" runat="server" style="display: none;">
                            <span class="or-text">-OR-</span>
                            <p class="company-description">
                                <asp:Label ID="lblCompanyAddress" runat="server" Text="Address : Noor Tower (14th Floor), 1/F Free School Street, Sonargaon Road,"></asp:Label>
                            </p>
                        </div>
                        <p id="not_registered" runat="server">
                            If you are not registered on npljobs.com <a href="../NewUser.aspx" target="_blank">Click here</a>
                        </p>
                        <div style="display: none;">
                            <a href="#" id="EmailJobYourFriend1" style="color: #5C6ECF;">E-Mail this job to Your
                                Friend</a><span id="separatePipe" style="text-decoration: none;">||</span><a href="#"
                                    id="ViewAllJobCompany" class="ViewCompanyJobs" style="color: #5C6ECF;">View All
                                    Jobs of this Company</a>
                        </div>
                    </div>
                </div>
                <div class="col-md-6 orange-body-bg nomargin job-sum">
                    <div class="job-sum-mp">
                        <h4>Job Summary</h4>
                        <div class="row">
                            <div class="col-md-4">Job Title</div>
                            <div class="col-md-8">
                                :
                                <asp:Label ID="lblJobTitle" runat="server" CssClass=" job-sum-value-level"></asp:Label>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-4">Number Of Vacancy</div>
                            <div class="col-md-8">
                                :
                                <asp:Label ID="lblNoOfVacancy" runat="server" CssClass=" job-sum-value-level"></asp:Label>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-4">Reference Number</div>
                            <div class="col-md-8">
                                :
                                <asp:Label ID="lblReferenceNo" runat="server" CssClass=" job-sum-value-level"></asp:Label>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-4">Salary</div>
                            <div class="col-md-8">
                                :
                                <asp:Label ID="lblSalary" runat="server" CssClass=" job-sum-value-level"></asp:Label>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-4">Work Type</div>
                            <div class="col-md-8">
                                :
                                <asp:Label ID="lblWorkType" runat="server" Text="Full Time" CssClass=" job-sum-value-level"></asp:Label>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-4">Job Level</div>
                            <div class="col-md-8">
                                :
                                <asp:Label ID="lblJobLevel" runat="server" Text="Mid Level" CssClass=" job-sum-value-level"></asp:Label>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-4">Job Location</div>
                            <div class="col-md-8">
                                :
                                <asp:Label ID="lblLocation" runat="server" CssClass=" job-sum-value-level"></asp:Label>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-4">Posted on</div>
                            <div class="col-md-8">
                                :
                                <asp:Label ID="lblPostedOn" runat="server" CssClass=" job-sum-value-level"></asp:Label>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-4">Posted Until</div>
                            <div class="col-md-8">
                                :
                                <asp:Label ID="lblPostedUntil" runat="server" CssClass=" job-sum-value-level"></asp:Label>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-4">Advertiser</div>
                            <div class="col-md-8 company-name">
                                :
                                <asp:Label ID="lblAdvertiser" runat="server" Text="Hitacy Construction Machinary. Australia" CssClass=" job-sum-value-level"></asp:Label>
                            </div>
                        </div>
                        <div class="row">
                            <div class="col-md-4">&nbsp;</div>
                            <div class="col-md-8">
                                <a href="#" class="ViewCompanyJobs">Other jobs from this advertiser</a>
                            </div>
                        </div>
                        <div style="display: none;">
                            <div>
                                <asp:Image ID="imgSavedJobs" runat="server" ImageUrl="~/Images/AddSavedJobs.png" Width="20px" CssClass="SavedJobs" />
                                <asp:Image ID="imgRemovedSavedJobs" runat="server" ImageUrl="~/Images/RemovedSavedJobs.png" Width="20px" Style="display: none;" CssClass="RemovedJobs" />
                            </div>
                            <div style="margin-top: 4px;">
                                <a id="SavedJobs" class="SavedJobs" href="#"></a>
                                <a id="RemovedJobs" class="RemovedJobs" href="#" style="display: none;"></a>
                            </div>
                        </div>
                    </div>
                    <div class="job-sum-mp">
                        <h4>Postal Address</h4>
                        <div id="divCompanyAddress2" runat="server" style="display: none;">
                            <p class="company-description">
                                <asp:Label ID="lblCompanyAddress2" runat="server" Text="Address : Noor Tower (14th Floor), 1/F Free School Street, Sonargaon Road," CssClass="company-address2"></asp:Label>
                            </p>
                        </div>
                        <div id="div1" runat="server" style="">
                            <p class="">
                                <label id="lblSendMailMessage" class="sendMailMessage" style="color: green;"></label>
                            </p>
                        </div>

                        <div class="text-center" id="divApplyButton2" runat="server">
                            <span class="float-shadow button-margin">
                                <asp:Button runat="server" Text="Apply Now" ID="btnApply1" OnClick="btnApply_Click"
                                    CssClass="btn btn-primary orange-gradiant float-shadow" OnClientClick="return false;" />
                            </span>
                        </div>
                    </div>
                    <div class="row no-margin-padding">
                        <div class="npltools">
                            <span>NPL TOOLS</span>
                        </div>
                        <div class="job-sum-mp npl-tools">
                            <ul>
                                <li>
                                    <asp:LinkButton ID="lnkSavePdf" runat="server" OnClick="lnkSavePdf_OnClick">Save as PDF</asp:LinkButton>
                                </li>
                                <li>
                                    <a href="#" onclick="return PrintPanel();">Print this job</a>
                                </li>
                                <li>
                                    <a id="imgSavedJobsTools" href="#" class="SavedJobs">Add to saved jobs</a>
                                    <a id="imgRemovedSavedJobsTools" href="#" class="RemovedJobs">Removed from saved jobs</a>
                                    <%--<asp:Image ID="imgSavedJobsTools" runat="server" ImageUrl="~/Images/AddSavedJobs.png" Width="20px" class="SavedJobs" />
                                <asp:Image ID="imgRemovedSavedJobsTools" runat="server" ImageUrl="~/Images/RemovedSavedJobs.png" Width="20px" Style="display: none;" class="RemovedJobs" />--%>
                                    <%--<a id="SavedJobsTools" class="SavedJobs" href="#" style="display: none;"></a>
                                    <a id="RemovedJobsTools" class="RemovedJobs" href="#" style="display: none;"></a>--%>
                                </li>
                                <li>
                                    <a href="#" id="EmailJobYourFriend">E-Mail this job to your friend
                                    </a>
                                </li>
                            </ul>
                        </div>
                        <div>
                            <br />
                            <label id="lblSendMailToFriendMessage" class="sendMailMessage" style="color: green; margin-left: 10px;"></label>
                        </div>

                    </div>
                </div>

            </div>
        </div>
    </div>

    <div id="saved_jobs_online_application_modal_dialog" style="display: none">
        <div class="panel-body job-details">
            <asp:Panel ID="pnlSavedJobsApplicationLogin" runat="server" DefaultButton="btnSavedJobsLogIn">
                <div class="row row-padding">
                    <div class="col-md-4">Email ID</div>
                    <div class="col-md-8 login-field">
                        <asp:TextBox ID="txtSavedJobsEmailId" runat="server"></asp:TextBox>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-4">Password</div>
                    <div class="col-md-8 login-field">
                        <asp:TextBox ID="txtSavedJobsPassword" runat="server" TextMode="Password"></asp:TextBox>
                    </div>
                </div>
                <div class="row">
                    <span class="float-shadow login-button-margin">
                        <asp:Button runat="server" Text="Log In" ID="btnSavedJobsLogIn" CssClass="btn btn-primary orange-gradiant float-shadow"
                            OnClientClick="return false;" />
                    </span>

                </div>
                <div id="savedJobsErrorMsg" class="row" style="color: Red; display: none;">
                    Invalid Credential!! Please try again.
                </div>
            </asp:Panel>
        </div>
    </div>
    <div id="online_application_modal_dialog" style="display: none">
        <div id="OnlineApplicationLogin" class="panel-body job-details">
            <asp:Panel ID="pnlOnlineApplicationLogin" runat="server" DefaultButton="btnApplyOnlineContinue">
                <div class="SectionBlockStyle OnlineApplicationTitle">
                    Please, Login to your Job Seeker Account
                </div>
                <div class="row row-padding">
                    <div class="col-md-4">Email ID</div>
                    <div class="col-md-8 login-field">
                        <asp:TextBox ID="txtEmailId" runat="server"></asp:TextBox>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-4">Password</div>
                    <div class="col-md-8 login-field">
                        <asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>
                    </div>
                </div>
                <div class="row">
                    <span class="float-shadow login-button-margin">
                        <asp:Button runat="server" Text="Continue" ID="btnApplyOnlineContinue" CssClass="btn btn-primary orange-gradiant float-shadow"
                            OnClientClick="return false;" />
                    </span>
                </div>
                <div id="applyOnlineLoggedInMsg" class="row" style="color: Red; display: none;">
                    Invalid Credential!! Please try again.
                </div>
            </asp:Panel>
        </div>
        <div id="OnlineApplicationSalary" class="panel-body job-details" style="display: none">
            <asp:Panel ID="pnlOnlineApplicationSalary" runat="server" DefaultButton="txtOnlineApplicationApplyOnline">
                <div class="row row-padding">
                    <div class="col-md-4 label-width">Your Expected Salary (Monthly)</div>
                    <div class="col-md-8 login-field">
                        <asp:TextBox ID="txtOnlineApplicationSalary" runat="server" CssClass="OnlineAppsSalaryInputStyle"
                            MaxLength="10"></asp:TextBox>
                    </div>
                </div>
                <div class="row text-center">
                    <p class="company-description">
                        <span>Your Contact Information</span><br />
                        <span>Mobile : </span>
                        <span class="smallLabelStyle" id="jobSeekerMobile">01711052187</span><br />
                        <span>Email : </span>
                        <span class="smallLabelStyle" id="jobSeekerEmail">manobesh1982@gmail.com</span>
                    </p>
                </div>
                <div class="row">
                    <p class="company-description font-size-small"><span>Employeers may contact through your above information.</span></p>
                </div>

                <div class="row">
                    <span class="float-shadow login-button-margin">
                        <asp:Button runat="server" Text="Apply Online" ID="txtOnlineApplicationApplyOnline"
                            CssClass="btn btn-primary orange-gradiant float-shadow" OnClientClick="return false;" />
                    </span>
                </div>
                <div id="applyOnlineApplyJobsMsg" class="row" style="color: Red; display: none;">
                    Job apply error!!!
                </div>
            </asp:Panel>
        </div>
    </div>
    <div id="email_job_friend_modal_dialog" style="display: none">
        <div id="loginFriend" class="panel-body job-details">
            <asp:Panel ID="pnlLoginFriend" runat="server" DefaultButton="btnContinueFriend">
                <%--<div class="SectionBlockStyle OnlineApplicationTitle">
                    Login to your Job Seeker Account
                </div>--%>
                <div class="row row-padding">
                    <div class="col-md-4">Email ID</div>
                    <div class="col-md-8 login-field">
                        <asp:TextBox ID="txtLoginEmailId" runat="server"></asp:TextBox>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-4">Password</div>
                    <div class="col-md-8 login-field">
                        <asp:TextBox ID="txtLoginPassword" runat="server" TextMode="Password"></asp:TextBox>
                    </div>
                </div>
                <div class="row">
                    <span class="float-shadow login-button-margin">
                        <asp:Button runat="server" Text="Continue" ID="btnContinueFriend" CssClass="btn btn-primary orange-gradiant float-shadow"
                            OnClientClick="return false;" />
                    </span>
                </div>
                <div id="loginErrorMsg" class="row" style="color: Red;">
                    Invalid Credential!! Please try again.
                </div>
            </asp:Panel>
        </div>
        <div id="FriendEmail" class="panel-body job-details" style="display: none">
            <asp:Panel ID="pnlFriendEmail" runat="server" DefaultButton="btnSendFriend">
                <%--<div class="SectionBlockStyle OnlineApplicationTitle">
                Enter Email ID of Your Friend
            </div>--%>
                <div class="row row-padding">
                    <div class="col-md-4">Email ID</div>
                    <div class="col-md-8 login-field">
                        <asp:TextBox ID="txtLoggedinEmailId" runat="server"></asp:TextBox>
                    </div>
                </div>
                <div class="row">
                    <div class="col-md-4">Friend's Email ID</div>
                    <div class="col-md-8 login-field">
                        <asp:TextBox ID="txtFriendEmailId" runat="server"></asp:TextBox>
                    </div>
                </div>
                <div class="row">
                    <span class="float-shadow login-button-margin">
                        <asp:Button runat="server" Text="Send" ID="btnSendFriend" CssClass="btn btn-primary orange-gradiant float-shadow"
                            OnClientClick="return false;" />
                    </span>
                </div>
                <div id="DivEmailSentErrorMsg" class="row" style="color: Red; display: none;">
                    Email sending error!!!
                </div>
            </asp:Panel>
        </div>
    </div>
    <div id="view_company_jobs_modal_dialog" class="location-hide-container" style="display: none">
        <div id="JobsList">
            <%--<div class="SectionBlockStyle OnlineApplicationTitle">
                Click the Job Title to view the Job Details
            </div>--%>
            <table id="tblViewCompanyJobs" class="tblViewCompanyJobs table table-hover">
                <thead>
                    <tr>
                        <th>SL
                        </th>
                        <th>Job Title
                        </th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
            <div style="height: 20px;">
                &nbsp;
            </div>
            <%--<div class="SectionBlockStyle" style="text-align: center; padding-top: 5px; padding-bottom: 5px;">
                <asp:Button runat="server" Text="Continue" ID="Button2" CssClass="PopupCommandStyle"
                    OnClientClick="return false;" />
            </div>--%>
        </div>
    </div>
    <script>
        function ClearMessage() {
            //alert('ClearMessage');
            $("#lblSendMailMessage").fadeOut(15000);
            $("#lblSendMailToFriendMessage").fadeOut(15000);

            setTimeout(function () {
                $("#lblSendMailMessage").empty();
                $("#lblSendMailMessage").text("");

                $("#lblSendMailToFriendMessage").empty();
                $("#lblSendMailToFriendMessage").text();

            }, millisecondsToWait);
        }
        function PrintPanel() {
            var panel = document.getElementById("<%=pnlJob.ClientID %>");
            var printWindow = window.open('', '', 'height=400,width=800,scrollbars=yes,');


            printWindow.document.write('<html>');
            printWindow.document.write('<html><style type="text/css">.watermarkImage {background-image: url("../images/watermarkImage.png");background-size: 100% 100%;background-repeat: no-repeat;background-position: center;background-attachment: fixed}</style>');
            printWindow.document.write('<head><title>Job Contents</title>');
            printWindow.document.write('</head><body class=\'watermarkImage\' >');
            printWindow.document.write(panel.innerHTML);
            printWindow.document.write('</body></html>');
            printWindow.document.close();
            setTimeout(function () {
                printWindow.print();
            }, 500);
            return false;
        }
    </script>

    <%: Scripts.Render("~/JobDetailsScripts") %>

    <script type="text/javascript">
        var addToSavedJobs = "Add to Saved Jobs";
        var removeFromSavedJobs = "Remove from Saved Jobs";

        function InIEvent() {
            $("#<%=txtOnlineApplicationSalary.ClientID %>").ForceNumberOnly();
            CheckAvailableJobsByCompany();
            ShowHideSavedRemovedLinks();
            ShowHideSavedRemovedLinksTools();
        }

        function CheckAvailableJobsByCompany() {
            var companyID = $("#<%=hfEmployeerId.ClientID %>").val();
            $.ajax({
                type: "POST",
                url: "JobDetails.aspx/GetCountCompanyJobs",
                data: JSON.stringify({ companyID: companyID }),
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                cache: false,
                async: false,
                success: function (msg) {
                    var obj = msg.d;
                    if (obj === 0) {
                        $("#ViewAllJobCompany").hide();
                        $("#separatePipe").hide();
                    }
                },
                error: function (data, status, jqXHR) {
                    ShowErrorMsg(status);
                }
            });
        }

        function ShowHideSavedRemovedLinks() {
            var jobId = $("#<%=hfJobId.ClientID %>").val();

            $("#<%=imgSavedJobs.ClientID %>").hide();
            $("#<%=imgRemovedSavedJobs.ClientID %>").hide();
            $("#SavedJobs").hide();
            $("#RemovedJobs").hide();

            $.ajax({
                type: "POST",
                url: "JobDetails.aspx/ShowHideSavedRemovedLinks",
                data: JSON.stringify({ jobId: jobId }),
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                cache: false,
                async: false,
                success: function (msg) {
                    var obj = msg.d;
                    if (obj === true) {
                        $("#<%=imgRemovedSavedJobs.ClientID %>").show();
                        $("#RemovedJobs").html(removeFromSavedJobs);
                        $("#RemovedJobs").show();
                    }
                    else {
                        $("#<%=imgSavedJobs.ClientID %>").show();
                        $("#SavedJobs").html(addToSavedJobs);
                        $("#SavedJobs").show();
                    }
                },
                error: function (data, status, jqXHR) {
                }
            });
        }

        function ShowHideSavedRemovedLinksTools() {
            var jobId = $("#<%=hfJobId.ClientID %>").val();

            $("#imgSavedJobsTools").hide();
            $("#imgRemovedSavedJobsTools").hide();
            //$("#SavedJobsTools").hide();
            //$("#RemovedJobsTools").hide();

            $.ajax({
                type: "POST",
                url: "JobDetails.aspx/ShowHideSavedRemovedLinks",
                data: JSON.stringify({ jobId: jobId }),
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                cache: false,
                async: false,
                success: function (msg) {
                    var obj = msg.d;
                    if (obj === true) {
                        $("#imgRemovedSavedJobsTools").show();
                        $("#RemovedJobsTools").html(removeFromSavedJobs);
                        $("#RemovedJobsTools").show();
                    }
                    else {
                        $("#imgSavedJobsTools").show();
                        //$("#SavedJobsTools").html(addToSavedJobs);
                        //$("#SavedJobsTools").show();
                    }
                },
                error: function (data, status, jqXHR) {
                }
            });
        }

        function CloseModalPopup() {
            $("#view_company_jobs_modal_dialog").dialog('close');
        }

        $(document).ready(InIEvent);

        $(document).ready(function () {
            Sys.WebForms.PageRequestManager.getInstance().add_endRequest(InIEvent);

            var HasJobSeekerLoggedIn = "";
            var loginFriendStep = false;
            var applyOnlineLoggedInStep = false;

            function LoadJobsByCompany() {
                var companyID = $("#<%=hfEmployeerId.ClientID %>").val();
                var jobId = $("#<%=hfJobId.ClientID %>").val();
                $.ajax({
                    type: "POST",
                    url: "JobDetails.aspx/GetCompanyJobs",
                    data: JSON.stringify({ companyID: companyID, jobId: jobId }),
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    cache: false,
                    async: false,
                    success: function (msg) {
                        var obj = JSON.parse(msg.d); 
                        var html = "";
                        $.each(obj, function (key, value) {
                            html = html + "<tr id='" + value.JobID + "'>";
                            html = html + "<input type='hidden' id='" + value.JobID + "' value='" + value.JobID + "' />";
                            html = html + "<td width='50px'>" + (key + 1) + "</td>";
                            html = html + "<td><a target='_blank' title='Click on Job Title to view Job Details' onclick='javascript:CloseModalPopup()' href=JobDetails.aspx?jID=" + value.EncodeJobID + ">" + value.JobTitle + "</a></td>";
                            html = html + "</tr>";
                        });
                        if (obj.length == 0)
                        {
                            html = html + "<tr><td colspan=2>No record found!!!</td></tr>";
                        }
                        $("#tblViewCompanyJobs >tbody").html('');
                        $("#tblViewCompanyJobs >tbody").append(html);
                    },
                    error: function (data, status, jqXHR) {
                        ShowErrorMsg(status);
                    }
                });
            }

            function LoadJobSeekerLoggedInContactInfor() {
                $.ajax({
                    type: "POST",
                    url: "JobDetails.aspx/GetJobSeekerLoggedInContactInfor",
                    data: JSON.stringify({}),
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    cache: false,
                    async: false,
                    success: function (msg) {
                        var obj = JSON.parse(msg.d);
                        $("#jobSeekerMobile").html(obj.MobilePhone);
                        $("#jobSeekerEmail").html(obj.Email);
                    },
                    error: function (data, status, jqXHR) {
                        ShowErrorMsg(status);
                    }
                });
            }

            function LoadJobSeekerLoggedIn() {
                $.ajax({
                    type: "POST",
                    url: "JobDetails.aspx/HasJobSeekerLoggedIn",
                    data: JSON.stringify({}),
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    cache: false,
                    async: false,
                    success: function (msg) {
                        var obj = msg.d;
                        HasJobSeekerLoggedIn = obj;
                    },
                    error: function (data, status, jqXHR) {
                    }
                });
            }

            function SavedJob() {
                var jobId = $("#<%=hfJobId.ClientID %>").val();
                $.ajax({
                    type: "POST",
                    url: "JobDetails.aspx/SavedJob",
                    data: JSON.stringify({ jobId: jobId }),
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    cache: false,
                    async: false,
                    success: function (msg) {
                        var obj = msg.d;
                        if (obj === "") {
                            $("a.SavedJobs").css("display", "none");
                            $("img.SavedJobs").css("display", "none");
                            $("a.RemovedJobs").html(removeFromSavedJobs);
                            $("a.RemovedJobs").css("display", "block");
                            $("img.RemovedJobs").css("display", "block");
                        }
                    },
                    error: function (data, status, jqXHR) {
                    }
                });
            }

            function RemovedJob() {
                var jobId = $("#<%=hfJobId.ClientID %>").val();
                $.ajax({
                    type: "POST",
                    url: "JobDetails.aspx/RemovedJob",
                    data: JSON.stringify({ jobId: jobId }),
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    cache: false,
                    async: false,
                    success: function (msg) {
                        var obj = msg.d;
                        if (obj === true) {
                            $("a.RemovedJobs").css("display", "none");
                            $("img.RemovedJobs").css("display", "none");
                            $("a.SavedJobs").html(addToSavedJobs);
                            $("a.SavedJobs").css("display", "block");
                            $("img.SavedJobs").css("display", "block");
                        }
                        else {
                            $("a.SavedJobs").css("display", "none");
                            $("img.SavedJobs").css("display", "none");
                            $("a.RemovedJobs").html(removeFromSavedJobs);
                            $("a.RemovedJobs").css("display", "block");
                            $("img.RemovedJobs").css("display", "block");
                        }
                    },
                    error: function (data, status, jqXHR) {
                    }
                });
            }

            jQuery("#saved_jobs_online_application_modal_dialog").dialog({
                title: "Login to your job seeker account",
                modal: true,
                autoOpen: false,
                width: 380,
                height: 'auto',
                resizable: false,
                appendTo: "form",
                buttons: {
                },
                close: function () {
                }
            });

            jQuery("#online_application_modal_dialog").dialog({
                title: "Online Application",
                modal: true,
                autoOpen: false,
                width: 380,
                height: 'auto',
                resizable: false,
                appendTo: "form",
                buttons: {
                },
                close: function () {
                    if (applyOnlineLoggedInStep && HasJobSeekerLoggedIn != "")
                    { }
                    else if (applyOnlineLoggedInStep)
                        window.location.reload();
                }
            });
            jQuery("#email_job_friend_modal_dialog").dialog({
                title: "Login to your job seeker account",
                modal: true,
                autoOpen: false,
                width: 380,
                height: 'auto',
                resizable: false,
                appendTo: "form",
                buttons: {
                },
                close: function () {
                    if (HasJobSeekerLoggedIn == "" && !loginFriendStep)
                        window.location.reload();
                }
            });

            jQuery("#view_company_jobs_modal_dialog").dialog({
                title: $("#<%=hfEmployeerName.ClientID %>").val(),
                modal: true,
                autoOpen: false,
                width: 500,
                height: 400,
                resizable: false,
                appendTo: "form",
                buttons: {
                },
                close: function () {
                }
            });

            $("#<%=txtFriendEmailId.ClientID %>").focus(function () {
                $("#DivEmailSentErrorMsg").hide("slow");
            });

            $("#<%=txtOnlineApplicationSalary.ClientID %>").focus(function () {
                $("#applyOnlineApplyJobsMsg").hide("slow");
            });

            $("#<%=txtEmailId.ClientID %>").focus(function () {
                $("#applyOnlineLoggedInMsg").hide("slow");
            });
            $("#<%=txtPassword.ClientID %>").focus(function () {
                $("#applyOnlineLoggedInMsg").hide("slow");
            });

            $("#<%=txtLoginEmailId.ClientID %>").focus(function () {
                $("#loginErrorMsg").hide("slow");
            });
            $("#<%=txtLoginPassword.ClientID %>").focus(function () {
                $("#loginErrorMsg").hide("slow");
            });

            $("#<%=txtSavedJobsEmailId.ClientID %>").focus(function () {
                $("#savedJobsErrorMsg").hide("slow");
            });
            $("#<%=txtSavedJobsPassword.ClientID %>").focus(function () {
                $("#savedJobsErrorMsg").hide("slow");
            });

            ///////////////Saved Jobs///////////////
            $(".SavedJobs").live('click', function () {
                $("#<%=txtSavedJobsEmailId.ClientID %>").val("");
                $("#<%=txtSavedJobsPassword.ClientID %>").val("");
                HasJobSeekerLoggedIn = "";

                LoadJobSeekerLoggedIn();

                if (HasJobSeekerLoggedIn === "") {
                    $('#saved_jobs_online_application_modal_dialog').dialog('open');
                }
                else {
                    SavedJob();
                }
                return false;
            });

            var clickOnRemovedJobs = false;
            $(".RemovedJobs").live('click', function () {
                $("#<%=txtSavedJobsEmailId.ClientID %>").val("");
                $("#<%=txtSavedJobsPassword.ClientID %>").val("");

                clickOnRemovedJobs = true;

                LoadJobSeekerLoggedIn();

                if (HasJobSeekerLoggedIn === "") {
                    $('#saved_jobs_online_application_modal_dialog').dialog('open');
                }
                else {
                    RemovedJob();
                }
                return false;
            });

            $("#<%=btnSavedJobsLogIn.ClientID %>").live('click', function () {
                var userName = $("#<%=txtSavedJobsEmailId.ClientID %>").val();
                var password = $("#<%=txtSavedJobsPassword.ClientID %>").val();

                $("#savedJobsErrorMsg").hide();
                if (userName.length < 1 || password.length < 1) {
                    $("#savedJobsErrorMsg").html("Enter user name/password");
                    $("#savedJobsErrorMsg").show();
                    return false;
                }
                else {
                    $.ajax({
                        type: "POST",
                        url: "JobDetails.aspx/GetJobSeekerLoggedIn",
                        data: JSON.stringify({ userName: userName, password: password }),
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        cache: false,
                        async: false,
                        success: function (msg) {
                            var obj = msg.d;
                            if (obj == true) {
                                if (clickOnRemovedJobs == true) {
                                    RemovedJob();
                                    clickOnRemovedJobs = false;
                                }
                                else
                                    SavedJob();

                                $('#saved_jobs_online_application_modal_dialog').dialog('close');
                                window.location.reload();
                            }
                            else {
                                $("#savedJobsErrorMsg").show();
                                $("#savedJobsErrorMsg").html("Invalid Credential!! Please try again.");
                            }
                        },
                        error: function (data, status, jqXHR) {
                        }
                    });
                }
                return false;
            });
            ///////////////END//////////////////////

            ///////////////Apply Online///////////////
            function ApplyNow() {
                $("#<%=txtEmailId.ClientID %>").val("");
                $("#<%=txtPassword.ClientID %>").val("");
                $("#<%=txtOnlineApplicationSalary.ClientID %>").val("");
                HasJobSeekerLoggedIn = "";

                LoadJobSeekerLoggedIn();

                $("#OnlineApplicationSalary").hide();
                $("#OnlineApplicationLogin").hide();
                if (HasJobSeekerLoggedIn != "") {
                    LoadJobSeekerLoggedInContactInfor();
                    $("#<%=txtOnlineApplicationApplyOnline.ClientID %>").removeAttr('disabled');
                    $("#<%=txtOnlineApplicationApplyOnline.ClientID %>").val("Apply Online");
                    $("#OnlineApplicationSalary").show();
                    applyOnlineLoggedInStep = true;
                }
                else {
                    $("#OnlineApplicationLogin").show();
                    applyOnlineLoggedInStep = false;
                }
                $("#applyOnlineLoggedInMsg").html("");
                $('#online_application_modal_dialog').dialog('open');
            }
            $("#<%=btnApply.ClientID %>").live('click', function () {
                ApplyNow();
                return false;
            });
            $("#<%=btnApply1.ClientID %>").live('click', function () {
                ApplyNow();
                return false;
            });
            $("#<%=btnApplyOnlineContinue.ClientID %>").live('click', function () {
                var userName = $("#<%=txtEmailId.ClientID %>").val();
                var password = $("#<%=txtPassword.ClientID %>").val();

                $("#applyOnlineLoggedInMsg").hide();
                if (userName.length < 1 || password.length < 1) {
                    $("#applyOnlineLoggedInMsg").html("Enter user name/password");
                    $("#applyOnlineLoggedInMsg").show();
                    return false;
                }
                else {
                    $.ajax({
                        type: "POST",
                        url: "JobDetails.aspx/GetJobSeekerLoggedIn",
                        data: JSON.stringify({ userName: userName, password: password }),
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        cache: false,
                        async: false,
                        success: function (msg) {
                            var obj = msg.d;


                            $("#OnlineApplicationLogin").hide();
                            $("#OnlineApplicationSalary").hide();
                            if (obj == true) {
                                LoadJobSeekerLoggedInContactInfor();
                                $("#OnlineApplicationSalary").show();
                                applyOnlineLoggedInStep = true;
                            }
                            else {
                                $("#OnlineApplicationLogin").show();
                                $("#applyOnlineLoggedInMsg").show();
                                $("#applyOnlineLoggedInMsg").html("Invalid Credential!! Please try again.");
                                applyOnlineLoggedInStep = false;
                            }
                        },
                        error: function (data, status, jqXHR) {
                        }
                    });
                }
                return false;
            });
            $("#<%=txtOnlineApplicationApplyOnline.ClientID %>").live('click', function () {
                var jobId = $("#<%=hfJobId.ClientID %>").val();
                var expectedSalary = $("#<%=txtOnlineApplicationSalary.ClientID %>").val();
                if (expectedSalary == '') {
                    $('#applyOnlineApplyJobsMsg').html("Enter expected salary");
                    $('#applyOnlineApplyJobsMsg').show();
                    return false;
                }
                var companyID = $("#<%=hfEmployeerId.ClientID %>").val();
                $('#applyOnlineApplyJobsMsg').hide();
                $(this).attr('disabled', true);
                $(this).val('Sending...');
                $.ajax({
                    type: "POST",
                    url: "JobDetails.aspx/ApplyOnlineJob",
                    data: JSON.stringify({ jobId: jobId, expectedSalary: expectedSalary, companyID: companyID }),
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    cache: false,
                    async: true,
                    success: function (msg) {
                        var obj = msg.d;
                        //alert('ClearMessage');

                        if (obj != "") {
                            $('#applyOnlineApplyJobsMsg').html(obj);
                            $('#applyOnlineApplyJobsMsg').show();
                            ClearMessage();
                        }
                        else {
                            $('#online_application_modal_dialog').dialog('close');
                            $("#lblSendMailMessage").text("Applied job successfully");
                            ClearMessage();
                        }
                    },
                    error: function (data, status, jqXHR) {
                        //$("#lblSendMailMessage").text("Failed to apply.Please try again later.");
                        ClearMessage();
                    }
                });
                return false;
            });
            /////////////////////END///////////////////

            ///////////////Send Email to Friends///////////////
            $("#<%=btnSendFriend.ClientID %>").live('click', function () {
                var jobId = $("#<%=hfJobId.ClientID %>").val();
                var jobSeekerEmailAddress = $("#<%=txtLoggedinEmailId.ClientID %>").val();
                var friendsEmailAddress = $("#<%=txtFriendEmailId.ClientID %>").val();
                $("#DivEmailSentErrorMsg").hide();

                $(this).attr('disabled', true);
                $(this).val('Sending...');

                $.ajax({
                    type: "POST",
                    url: "JobDetails.aspx/SendEMailToFriend",
                    data: JSON.stringify({ jobId: jobId, jobSeekerEmailAddress: jobSeekerEmailAddress, friendsEmailAddress: friendsEmailAddress }),
                    contentType: "application/json; charset=utf-8",
                    dataType: "json",
                    cache: false,
                    async: true,
                    success: function (msg) {
                        var obj = msg.d;
                        //alert(HasJobSeekerLoggedIn);
                        //alert(obj);

                        if (obj === "") {
                            $("#lblSendMailToFriendMessage").text("Sent to your friend successfully");
                            ClearMessage();
                            setTimeout(function () {
                                $("#email_job_friend_modal_dialog").dialog('close');
                                if (HasJobSeekerLoggedIn == "")
                                    window.location.reload();

                            }, 2000);

                        }
                        else {
                            $("#DivEmailSentErrorMsg").show();
                            $("#<%=btnSendFriend.ClientID %>").removeAttr('disabled');
                            $("#<%=btnSendFriend.ClientID %>").val("Send");
                            ClearMessage();
                        }


                    },
                    error: function (data, status, jqXHR) {
                        //$("#lblSendMailToFriendMessage").text("Failed to apply.Please try again later.");
                        ClearMessage();
                    }
                });
            });

            var millisecondsToWait = 12000;



            $("#<%=btnContinueFriend.ClientID %>").live('click', function () {
                var userName = $("#<%=txtLoginEmailId.ClientID %>").val();
                var password = $("#<%=txtLoginPassword.ClientID %>").val();
                $("#loginErrorMsg").hide();

                if (userName.length < 1 || password.length < 1) {
                    $("#loginErrorMsg").html("Enter user name/password");
                    $("#loginErrorMsg").show();
                    return false;
                }
                else {
                    $.ajax({
                        type: "POST",
                        url: "JobDetails.aspx/GetJobSeekerLoggedIn",
                        data: JSON.stringify({ userName: userName, password: password }),
                        contentType: "application/json; charset=utf-8",
                        dataType: "json",
                        cache: false,
                        async: false,
                        success: function (msg) {
                            var obj = msg.d;
                            $("#loginFriend").hide();
                            $("#FriendEmail").hide();
                            if (obj == true) {
                                $("#<%=txtLoggedinEmailId.ClientID %>").val(userName);
                                $("#<%=txtLoggedinEmailId.ClientID %>").attr("disabled", "disabled");
                                $("#FriendEmail").show();
                                loginFriendStep = false;
                            }
                            else {
                                $("#loginFriend").show();
                                $("#loginErrorMsg").html("Invalid Credential!! Please try again.");
                                $("#loginErrorMsg").show();
                                loginFriendStep = true;
                            }
                        },
                        error: function (data, status, jqXHR) {
                        }
                    });
                }
            });

            $("#EmailJobYourFriend").live('click', function () {
                $("#<%=txtLoginEmailId.ClientID %>").val("");
                $("#<%=txtLoginPassword.ClientID %>").val("");
                $("#<%=txtLoggedinEmailId.ClientID %>").val("");
                $("#<%=txtFriendEmailId.ClientID %>").val("");
                $("#loginErrorMsg").hide();

                HasJobSeekerLoggedIn = "";

                LoadJobSeekerLoggedIn();

                $("#loginFriend").hide();
                $("#FriendEmail").hide();
                if (HasJobSeekerLoggedIn != "") {
                    $("#<%=txtLoggedinEmailId.ClientID %>").val(HasJobSeekerLoggedIn);
                    $("#<%=txtLoggedinEmailId.ClientID %>").attr("disabled", "disabled");

                    $("#<%=btnSendFriend.ClientID %>").removeAttr('disabled');
                    $("#<%=btnSendFriend.ClientID %>").val("Send");

                    $("#FriendEmail").show();
                    loginFriendStep = false;
                }
                else {
                    $("#<%=txtLoggedinEmailId.ClientID %>").val("");
                    $("#loginFriend").show();
                    loginFriendStep = true;
                }
                $('#email_job_friend_modal_dialog').dialog('open');
                return false;
            });
            /////////////////////END///////////////////

            $(".ViewCompanyJobs").live('click', function () {
                LoadJobsByCompany();
                $('#view_company_jobs_modal_dialog').dialog('open');
                return false;
            });
        });
    </script>

</asp:Content>
